import type React from "react";
import ReactDOM from "react-dom";

export const Portal: React.FC<{ to: string }> = (props) => {
    return ReactDOM.createPortal(props.children, document.querySelector(props.to) || document.body)
}

export const Teleport = Portal
